package com.neu.cloudFactory.VO;

import com.neu.cloudFactory.PO.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class RentVO {
    private String id;//设备id
    private String code;
    private String name;
    private String type;
    private String detail;
    private String state;
    private String factoryAccount;//租用设备的工厂

    public RentVO(EquipMsg equipMsg, EquipType type, User user){
        this.id = Integer.toString(equipMsg.getId());
        this.code = equipMsg.getCode();
        this.name = equipMsg.getName();
        this.type = type.getName();
        this.detail = equipMsg.getDetail();
        this.state = equipMsg.getRunState();
        this.factoryAccount = user.getAccount();
    }
}
